/// <reference path="../../../Scripts/typings/jquery/jquery.d.ts" />
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var React = require("react");
var Css = require('../../工具代码/Css加载');
var ____1 = require('../展示组件/图标按钮');
var ____2 = require('./按钮常量');
Css.加载(module.filename);
var R按钮 = (function (_super) {
    __extends(R按钮, _super);
    function R按钮(props, ss) {
        _super.call(this, props, ss);
        this.state = { 还原按钮图标: '' };
        this.state = { 最大化按钮图标: '' };
    }
    R按钮.prototype.componentDidMount = function () {
    };
    R按钮.prototype.render = function () {
        var _this = this;
        if (typeof this.props.按钮类型 == 'undefined') {
            throw new Error('没有指定按钮类型');
        }
        if (this.props.按钮类型 == ____2.按钮类型.关闭按钮) {
            return (React.createElement(____1.default, {"按钮风格": ____2.按钮类型.关闭按钮, "自定义按钮样式": this.props.自定义按钮样式, "自定义图标样式": this.props.自定义图标样式, "宽度": "25px", "图标": 'icon-guanbi', "单击": this.props.关闭, "按下快捷键": this.props.按下快捷键}));
        }
        if (this.props.按钮类型 == ____2.按钮类型.最小化按钮) {
            return (React.createElement(____1.default, {"按钮风格": ____2.按钮类型.最小化按钮, "自定义按钮样式": this.props.自定义按钮样式, "自定义图标样式": this.props.自定义图标样式, "宽度": "25px", "图标": 'icon-zuixiaohua', "单击": this.props.最小化, "按下快捷键": this.props.按下快捷键}));
        }
        if (this.props.按钮类型 == ____2.按钮类型.还原按钮) {
            return (React.createElement(____1.default, {"按钮风格": ____2.按钮类型.还原按钮, "自定义按钮样式": this.props.自定义按钮样式, "自定义图标样式": this.props.自定义图标样式, "宽度": "25px", "图标": this.state.还原按钮图标 ? this.state.还原按钮图标 : 'icon-huanyuan', "单击": function (e) {
                if (_this.state.还原按钮图标 == 'icon-huanyuan') {
                    _this.setState({ 还原按钮图标: 'icon-zuidahua' });
                    _this.props.最大化 ? _this.props.最大化(e) : {};
                }
                else {
                    _this.setState({ 还原按钮图标: 'icon-huanyuan' });
                    _this.props.还原 ? _this.props.还原(e) : {};
                }
            }, "按下快捷键": this.props.按下快捷键}));
        }
        if (this.props.按钮类型 == ____2.按钮类型.最大化按钮) {
            return (React.createElement(____1.default, {"按钮风格": ____2.按钮类型.还原按钮, "自定义按钮样式": this.props.自定义按钮样式, "自定义图标样式": this.props.自定义图标样式, "宽度": "25px", "图标": this.state.最大化按钮图标 ? this.state.最大化按钮图标 : 'icon-zuidahua', "单击": function (e) {
                if (_this.state.最大化按钮图标 == 'icon-huanyuan') {
                    _this.setState({ 最大化按钮图标: 'icon-zuidahua' });
                    _this.props.还原 ? _this.props.还原(e) : {};
                }
                else {
                    _this.setState({ 最大化按钮图标: 'icon-huanyuan' });
                    _this.props.最大化 ? _this.props.最大化(e) : {};
                }
            }, "按下快捷键": this.props.按下快捷键}));
        }
    };
    return R按钮;
}(React.Component));
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = R按钮;
